package com.wj.blog.service.impl;

import com.wj.blog.mapper.TypeMapper;
import com.wj.blog.pojo.Type;
import com.wj.blog.service.AboutService;
import com.wj.blog.service.TypeServcie;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Author:   wj
 * Date:     2020/4/9 15:20
 * Description:
 */
@Service
public class TypeServiceImpl implements TypeServcie {
    @Autowired
    TypeMapper typeMapper;
    @Override
    public void add(Type type) {
        typeMapper.add(type);
    }

    @Override
    public void delete(Integer id) {
        typeMapper.delete(id);
    }

    @Override
    public List<Type> listBack() {
      return typeMapper.listBack();
    }

    @Override
    public void update(Type type) {
        typeMapper.update(type);
    }

    /**
     * 根据id 查询
     *
     * @param id
     * @return
     */
    @Override
    public Type getById(Integer id) {
        return typeMapper.getById(id);
    }
}
